<?php

// API入口文件

// 检测PHP环境
if(version_compare(PHP_VERSION,'5.3.0','<'))  die('require PHP > 5.3.0 !');

/*
if (!empty($_SERVER['HTTP_CLIENT_IP'])){  //check ip from share internet
$get_admin_ip=$_SERVER['HTTP_CLIENT_IP'];
}elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])){//to check ip is pass from PRoxy
$get_admin_ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
}else{
$get_admin_ip=$_SERVER['REMOTE_ADDR'];
}


if($get_admin_ip!='60.17.18.220'){

$from_http=strtolower($_SERVER["HTTP_USER_AGENT"]); 
if(strstr($from_http,'android') or strstr($from_http,'iphone') or strstr($from_http,'ipad')){
}else{
echo 404;exit;
} 


}*/






ini_set("magic_quotes_runtime",0);
// 定义运行时目录
define('RUNTIME_PATH','./Runtime/');

// 开启调试模式 建议开发阶段开启 部署阶段注释或者设为false
define('APP_DEBUG',true);
define('BIND_MODULE','Api');   ////默认绑定Cn模块
define('COMMON_PATH','./Common/');
define('__PHYSICS__',dirname(__FILE__));    /////开发包物理路径
define('__DOCROOT__',$_SERVER['DOCUMENT_ROOT'].'/');    /////开发环境物理路径
define('__GUPLOAD__','Uploads/');    /////图片上传路径
define('__VUPLOAD__','http://'.$_SERVER['SERVER_NAME'].'/'.__GUPLOAD__);    /////图片上传路径
define('__LOADWWW__','http://'.$_SERVER['SERVER_NAME'].':81/jdrapia/');    /////根目录URL


//echo    __VUPLOAD__;exit;
//生成静态页面的文件位置
//define('HTML_PATH','./Html/');
// 定义应用目录
define('APP_PATH','./App/');

// 引入ThinkPHP入口文件
define('THINK_PATH',realpath('./ThinkPHP').'/');

require THINK_PATH.'ThinkPHP.php';

?>